package io.geely.push.task;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import io.geely.push.service.PushDataService;

@Component
public class CronJobTest {
	
	@Autowired
	private PushDataService pushDataService;
	int i = 0;

	@Scheduled(cron = "0/10 * * * * *")
	public void everySecond() {
		
//		Date startDate = new Date();
//		List<PushDataEntity> list = pushDataService.queryBydate();
//		Date endDate = new Date();
//		System.out.println("一共花：" + (endDate.getTime() - startDate.getTime()));
//		System.out.println("推送的条数 ：" + list.size());
////		System.out.println("第" + (++i) + "次调用，每秒任务，当前时间：" + new Date());

	}

}